package com.yunsom.testdemo.javabase;

/**
 * @author Xbao
 * @description
 * @date 2022/4/26 16:46
 */
public class JavaBasePractice {

  public static void main(String[] args) {

    Writer a = new Writer(18);
    Writer b = new Writer(18);
    updateAge(a, b);

    System.out.println("更新后年龄:" + a.getAge());
    System.out.println("更新后年龄:" + b.getAge());

  }

  public static void updateAge(Writer a, Writer b1){

    a.setAge(30);

    b1 = new Writer(18);
    b1.setAge(30);
    System.out.println("");
  }
}
